<script setup lang="ts">
const props = defineProps({
    data: {
        type: Array<{ title: string, to: string }>, default: []
    }
})
</script>

<template>
    <div class="list">
        <router-link class="item" v-for="(item, i) in props.data" :to="item.to">
            {{ item.title }}
        </router-link>
    </div>
</template>

<style lang="less" scoped>
.list {
    padding: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    margin-bottom: 10px;
    white-space: pre-wrap;

    &:hover {
        background-color: #e8e8e8;
    }
}
</style>